package org.bjf.springboot.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 自定义错误页面覆盖spring boot中的错误页面
 */
@RestController
public class ErrorController {

  @GetMapping("/400")
  public String badRequest() {
    return "error/400";
  }

  @GetMapping("/404")
  public String notFound() {
    return "error/404";
  }

  @GetMapping("/500")
  public String serverError() {
    return "error/500";
  }
}